<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="{{ static_url('templates/style.css') }}" media="screen" rel="stylesheet" type="text/css" />
<link href="{{ static_url('templates/reset.css') }}" media="screen" rel="stylesheet" type="text/css" />
<link href="{{ static_url('templates/invalid.css') }}" media="screen" rel="stylesheet" type="text/css" />
<title>无线后台PID统计</title>
<SCRIPT LANGUAGE="Javascript" SRC="/static/templates/js/jquery-1.7.js"></SCRIPT>
<SCRIPT LANGUAGE="Javascript" SRC="/static/charts/js/FusionCharts.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
		var strXML = "{%raw xmlStr%}";
		function updateChart(chartSWF){
			//Create another instance of the chart.
			var chart1 = new FusionCharts(chartSWF, "chart1Id", "1200", "300", "0", "0");		   			
			chart1.setDataXML(strXML);
			chart1.render("chart1div");
		}
		var time="{{time}}"
		var pid="{{pid}}"
		
		$(document).ready(function(){
			$("#pid").val(pid);
			$("#time").val(time);
			$("#platform").val(platform);

			$(".main-content tr").mouseover(function(){ //如果鼠标移到class为stripe_tb的表格的tr上时，执行函数
			$(this).addClass("over");}).mouseout(function(){ //给这行添加class值为over，并且当鼠标一出该行时执行函数
			$(this).removeClass("over");}) //移除该行的class
			$(".main-content tr:even").addClass("alt"); //给class为stripe_tb的表格的偶数行添加class值为alt
		});
</SCRIPT>
</head>
<body>
<h3>无线后台PID统计</h3>
<div id="left-content">
<form name='frmUpdate' action="/client/pid">
<select id="time" name="time">
	<option value="">按时间</option>
	<option value="201111">2011年11月</option>
	<option value="201112">2011年12月</option>
</select>
<select id="pid" name="pid">
<option value="">按渠道</option>
{% for key, value in client_pid.items() %}
	<option value="{{key}}">{{value}}</option>
{% end %}
</select>
<input type='submit' value='查询' name='btnPie' />		
</form>
</div>
<div id="right-content">
<form name='frmUpdate'>
图表显示:	
<input type='button' value='柱狀图' onClick="javaScript:updateChart('/static/charts/fcf/FCF_MSColumn3D.swf');" name='btnColumn' />		
<input type='button' value='曲线图' onClick="javaScript:updateChart('/static/charts/fcf/FCF_MSLine.swf');" name='btnLine' />		
<input type='button' value='关闭' onClick="javaScript:closeChart2();" name='closeChart' />		
</form>
</div>
<div id="main-content">
<br/><br/><br/>
<div id="notediv">	
		&nbsp;
</div>
<div id="chart1div">
			&nbsp;
</div>
<script language="JavaScript">					
	//var chart1 = new FusionCharts("/static/charts/fcf/FCF_MSColumn3D.swf", "chart1Id", "1200", "400", "0", "0");
	//chart1.setDataXML(strXML);
	//chart1.render("chart1div");
</script>

<div class="content-box">
<table class="main-content">
<thead>
<tr><th>Date</th><th>PV</th><th>UV</th><th>VV</th></tr>
</thead>
{% for i in range(len(pv)) %}
    <tr>
	<td align='center'>{{keys[i]}}</td>
    <td align='center'>{{pv[keys[i]]}}</td>
    <td align='center'>{{uv[keys[i]]}}</td>
    <td align='center'>{{vv[keys[i]]}}</td>
    </tr>
{% end %}
</table>
</div>
</div>

</body>
</html>
